package com.zh.goods.service;


import com.zh.common.utils.R;
import com.zh.goods.domain.GoodsSublistDO;

import java.util.List;
import java.util.Map;

/**
 * 商品子表
 * 
 * @author chglee
 * @email 1992lcg@163.com
 * @date 2019-03-04 16:00:59
 */
public interface GoodsSublistService {
	
	GoodsSublistDO get(String id);
	
	List<GoodsSublistDO> list(Map<String, Object> map);
	
	int count(Map<String, Object> map);
	
	int save(GoodsSublistDO scGoodsSublist);
	
	int update(GoodsSublistDO scGoodsSublist);
	
	int remove(String id);
	
	int batchRemove(String[] ids);

	int removeByGoodsId(String id);

	int batchRemoveByGoodsId(String[] ids);

	List<GoodsSublistDO> listAll(String id);

	//上架
	public R putaway(String id);
	//下架
	public R soldOut(String id);
    //商品子表中某个商品对应的sku数量
	public int countAdd(String id);
	//商品库存
	public int getStock(String goodsId);

	public  List<GoodsSublistDO> getColour(String goodsId);

	public  List<GoodsSublistDO> getSpecification(String goodsId);

	public  List<GoodsSublistDO> getDataByGoodsId(String goodsId);

}
